<?php
	session_start();
	
	require_once('../../lib/'.'BaseDir.inc.htm');
	require_once (EIU_LIB.'View.class.htm');
	require_once('../../lib/'.'DBCommon.class.htm');
	
	if(!empty($_POST['SuppliID'])){
		$oDB = new DBCommon();
		$conn =  $oDB->stl_openConn();
		
		$q = "SELECT * FROM supplier_tbl WHERE SuppID=".$_POST['SuppliID'];
				
		$rs = $oDB->stl_db_select($q, $conn);
		
		if(is_array($rs)){
			foreach($rs as $key=>$value){
				if($rs[$key]->isDeleted=='0'){
					$data1['SuppliID'] = $rs[$key]->SuppID;
					$data1['name'] = $rs[$key]->ComName;
					$data1['shortname'] = $rs[$key]->ShortName;
					$data1['address'] = $rs[$key]->ComAddress;
					$data1['tel'] = $rs[$key]->ComTel;
					$data1['fax'] = $rs[$key]->ComFax;
					$data1['taxcode'] = $rs[$key]->TaxCode;
					$data1['bankname'] = $rs[$key]->BankName;
					$data1['bankcn'] = $rs[$key]->BankCN;
					$data1['bankacc'] = $rs[$key]->BankAcc;
					$data1['name1'] = $rs[$key]->ContactName;
					$data1['position'] = $rs[$key]->ContactPosition;
					$data1['tel1'] = $rs[$key]->ContactTel;
					$data1['mobile'] = $rs[$key]->ContactMobile;
					
					echo json_encode($data1);
				}
			}
		}
		$oDB->stl_closeConn($conn);
	}
?>
